﻿@{
    if(IsPost)
    {
        var items = Request.Cookies["cart"]["items"].Split(',');
        var itemToRemove = Request["itemId"];
        items = items.Where(val => val != itemToRemove).ToArray();
        
        Response.Cookies["cart"]["items"] = string.Join(",", items);
    }
}